import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:mandoby/core/app_export.dart';
import 'package:mandoby/core/utils/app_colors.dart';
import 'package:mandoby/core/widgets/custom_bottom_bar.dart';
import 'package:mandoby/core/widgets/custom_elevated_button.dart';
import 'package:mandoby/core/widgets/custom_text_form_field.dart';
import 'package:mandoby/features/home/presentation/pages/home_screen.dart';
import 'package:nb_utils/nb_utils.dart';

import '../../../../../core/widgets/custom_scaffold_widget.dart';

class NationallyScreen extends StatelessWidget {
  const NationallyScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {

    List<String> arabCountries = [
      'الجزائر',
      'البحرين',
      'جزر القمر',
      'جيبوتي',
      'مصر',
      'العراق',
      'الأردن',
      'الكويت',
      'لبنان',
      'ليبيا',
      'موريتانيا',
      'المغرب',
      'عُمان',
      'فلسطين',
      'قطر',
      'المملكة العربية السعودية',
      'الصومال',
      'السودان',
      'سوريا',
      'تونس',
      'الإمارات العربية المتحدة',
      'اليمن',
    ];
    return CustomScaffoldWidget(
      decoration: AppDecoration.nationallyMap,
      screenPadding: EdgeInsets.symmetric(horizontal: 20.h),
        body: SingleChildScrollView(
          child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            180.hs,
            Container(
              decoration: BoxDecoration(
                  color: AppColors.whiteA700, shape: BoxShape.circle),
              padding: EdgeInsets.all(10),
              child: Center(
                  child: Icon(
                Icons.location_on_sharp,
                color: AppColors.primary,
                size: 50,
              )),
            ).animate().slideY(),
            20.hs,
            Container(
              decoration: AppDecoration.fillPrimaryPr8,
              padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 2.h),
              child: Text(
                "أختر الجنسية",
                style: CustomTextStyles.font36whiteA700W600,
              ),
            ),
            35.hs,
            SizedBox(
              height: 60.h,
              width: double.maxFinite,
              child: DropdownButtonFormField(
                menuMaxHeight: 300.h,
                hint: Text("أختر الجنسية"),
                isExpanded: true,
                isDense: true,



                decoration: InputDecoration(
                  hintText: "",
                  hintStyle: theme.textTheme.bodyMedium,
                  contentPadding: EdgeInsets.all(15.w),
                  fillColor: AppColors.whiteA700,
                  filled: true,
                  border: OutlineInputBorder(
                    borderRadius: BorderRadius.circular(7.w),
                    borderSide: BorderSide(color: AppColors.primary),
                  ),
                  enabledBorder: OutlineInputBorder(
                    borderRadius: BorderRadius.circular(7.w),
                    borderSide: BorderSide(color: AppColors.primary),
                  ),
                  focusedBorder: OutlineInputBorder(
                    borderRadius: BorderRadius.circular(7.w),
                    borderSide: BorderSide(color: AppColors.primary),
                  ),
                ),
                items:arabCountries.map((e) => DropdownMenuItem(
                  child: Text(e),
                  value: e,
                )) .toList() ,
                onChanged: (value) {},
              ),
            ),
            20.hs,
            Row(
              children: [
                Text(
                  "جنسية اخرى :",
                  style: CustomTextStyles.font20primary700,
                ),
              ],
            ).paddingSymmetric(horizontal: 10.w, vertical: 14.h),
            CustomTextFormField(),
            20.hs,
            CustomElevatedButton(
              text: "التالي",
              width: 150.w,
              onPressed: () {
                HomeScreen().launch(context,isNewTask: true);
              },
            ),
            50.hs,
          ],
      ),
        ),
    );
  }
}
